package com.kepler.social.web.controller.assembler;

import com.kepler.social.domain.port.vo.LoginSuccessUserInfoVo;
import com.kepler.social.web.controller.param.LoginUserInfoRes;

public class UserLoginResAssembler {

    public static LoginUserInfoRes loginUserInfoRes(String token, LoginSuccessUserInfoVo infoVo) {
        LoginUserInfoRes res = LoginUserInfoRes.builder()
                .token(token)
                .userId(infoVo.getUserId())
                .countryCallingCode(infoVo.getCountryCallingCode()).mobilePhoneNumber(infoVo.getMobilePhoneNumber())
                .nickName(infoVo.getNickName())
                .gender(infoVo.getGender())
                .avatar(infoVo.getAvatar())
                .birthday(infoVo.getBirthday())
                .bgImage(infoVo.getBgImage())
                .profile(infoVo.getProfile())
                .modifiedTime(infoVo.getModifiedTime())
                .build();
        return res;
    }

    public static LoginUserInfoRes userStateCheckInfoRes(LoginSuccessUserInfoVo infoVo) {
        LoginUserInfoRes res = LoginUserInfoRes.builder()
                .userId(infoVo.getUserId())
                .countryCallingCode(infoVo.getCountryCallingCode()).mobilePhoneNumber(infoVo.getMobilePhoneNumber())
                .nickName(infoVo.getNickName())
                .gender(infoVo.getGender())
                .avatar(infoVo.getAvatar())
                .birthday(infoVo.getBirthday())
                .bgImage(infoVo.getBgImage())
                .profile(infoVo.getProfile())
                .modifiedTime(infoVo.getModifiedTime())
                .build();
        return res;
    }

}
